package com.hulin.mqtt.activeMQ;


import org.apache.activemq.broker.region.Destination;
import org.omg.PortableInterceptor.INACTIVE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author HULIN
 * @created with: safety-prod-supv
 * @package com.hlkj.web.controller.activeMQ
 * @description:
 * @date 2019/3/22 15:29
 * @modified By:
 * @Copyright © 2018 HAILIANG Info. Tech Ltd. All rights reserved.
 */

@RestController
public class ActiveMQSender {
    @Autowired
    private JmsTemplate jmsTemplate;

    /**
     * 发送订阅
     */

/*    //@GetMapping("/email/send/{id}")
    public String updateItem(@PathVariable String id) {
        jmsTemplate.convertAndSend("mailbox", id);
        return id;
    }
    //@GetMapping("/electric/send/{id}")
    public Integer electric(@PathVariable Integer id) {
        Elecric elecric = new Elecric("AA001", "ha00", id);
        jmsTemplate.convertAndSend("electric", elecric.toString());
        return id;
    }*/
}
